package com.itlong.cloud.operate.service;

import com.itlong.cloud.POJO.DTO.operate.OperateDeviceWhiteListDTO;
import com.itlong.cloud.POJO.DTO.operate.OperateDeviceWhiteListSaveDTO;
import com.itlong.cloud.POJO.VO.operate.DeviceWhiteListDetailVO;
import com.itlong.cloud.POJO.VO.operate.OperateDeviceWhiteListVO;
import com.itlong.cloud.POJO.VO.operate.OperateMacInfoVO;
import com.itlong.cloud.utils.page.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      运营-设备白名单管理服务接口
 * </desc>
 *
 * @createDate  2019/12/11
 */
public interface IOperateDeviceWhiteListService {

    /**
     * <desc>
     *      分页查询设备白名单信息
     * </desc>
     *
     * @param operateDeviceWhiteListDTO 查询参数DTO
     * @return  设备白名单分页数据
     * @Author Zhu.yj
     * @createDate  2019/12/11
     */
    Page<OperateDeviceWhiteListVO> getWhiteListByPage(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO) throws Exception;

    /**
     * <desc>
     *      保存设备白名单信息
     * </desc>
     *
     * @param operateDeviceWhiteListDTO 参数DTO
     * @return 保存结果
     * @Author Zhu.yj
     * @createDate  2019/12/12
     */
    Integer save(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO) throws Exception;

    /**
     * <desc>
     *      删除或禁用设备百名单信息
     * </desc>
     *
     * @param operateDeviceWhiteListDTO 参数DTO
     * @return 操作结果
     * @Author Zhu.yj
     * @createDate  2019/12/12
     */
    Integer forbidden(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO) throws Exception;

    /**
     * <desc>
     *      获取单个设备白名单信息
     * </desc>
     *
     * @param mac mac地址
     * @return
     * @Author Zhu.yj
     * @createDate  2019/12/16
     */
    OperateDeviceWhiteListVO getWhiteListByMac(String mac) throws Exception;

    /**
     * <desc>
     *      根据设备编号获取白名单信息状态
     * </desc>
     *
     * @param deviceUnique 设备编号
     * @return 白名单信息状态
     * @Author Zhu.yj
     * @createDate  2019/12/23
     */
    Integer getWhiteListStatus(String deviceUnique) throws Exception;

    /**
     * <desc>
     *      获取设备白名单详情
     * </desc>
     *
     * @param whiteListId 白名单id
     * @return
     * @Author Zhu.yj
     * @createDate  2020/8/11
     */
    DeviceWhiteListDetailVO getDetail(String whiteListId) throws Exception;

    /**
     * <desc>
     *      获取所有mac地址
     * </desc>
     *
     * @param
     * @return
     * @Author Zhu.yj
     * @createDate  2020/8/11
     */
    List<OperateMacInfoVO> getMacList() throws Exception;

    /**
     * <desc>
     *      批量导入设备白名单列表
     * </desc>
     *
     * @param whiteListSaveDTOList 设备白名单列表
     * @return
     * @Author Zhu.yj
     * @createDate  2020/8/11
     */
    Integer importDeviceWhiteList(List<OperateDeviceWhiteListSaveDTO> whiteListSaveDTOList) throws Exception;

    
    /**
    *<desc>
    * 根据上传的mac地址和授权文件id更新白名单中的设备激活状态
    *</desc>
    *
    * @Author  chengshican
    * @Date   2020-08-16 10:14
    * @Param  operateDeviceWhiteListDTO 参数
    * @Return      
    * @Exception   
    * 
    */
    int updateStatusByAuthIdAndMAC(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO)throws Exception;
    
    
    /**
    *<desc>
    * 根据上传的mac地址更新白名单中的设备异常标记和是否转换为设备白名单
    *</desc>
    *
    * @Author  chengshican
    * @Date   2020-09-02 14:53
    * @Param  operateDeviceWhiteListDTO 参数
    * @Return      
    * @Exception   
    * 
    */
    int updateFlagByMAC(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO) throws Exception;

    /**
     * <desc>
     *      修改公共操作
     * </desc>
     *
     * @param operateDeviceWhiteListDTO 设备白名单DTO
     * @return
     * @Author Zhu.yj
     * @createDate  2020/9/2
     */
    Integer update(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO) throws Exception;

    /**
     * <desc>
     *      转换为白名单
     * </desc>
     *
     * @param operateDeviceWhiteListDTO 设备白名单DTO
     * @return 受影响行数
     * @Author Zhu.yj
     * @createDate  2020/9/2
     */
    Integer convertToWhiteList(OperateDeviceWhiteListDTO operateDeviceWhiteListDTO) throws Exception;
}
